﻿using Baidu.Api.Response;
using Baidu.Api.Util;
using System;
using System.Collections.Generic;
using System.Text;

namespace Baidu.Api.Request
{
    /// <summary>
    /// 创建目录
    /// </summary>
    public class MakeDirectoryRequest : IBaiduRequest<MakeDirectoryResponse>
    {
        public string Path { get; set; }

        #region IBaiduRequest

        public string GetObjectName()
        {
            return "pcs/file";
        }

        public string GetMethod()
        {
            return "mkdir";
        }

        public IDictionary<string, string> GetFormParameters()
        {
            BaiduDictionary parameters = new BaiduDictionary();
            parameters.Add("path", this.Path);
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("path", this.Path);
            RequestValidator.ValidateMaxLength("path", this.Path, 1000);
        }

        #endregion
    }
}
